<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="org.apache.commons.lang.StringUtils,com.hz.framework.util.BusinessException,com.hz.framework.dao.*,com.hz.supermanage.bean.*" %>
<%@page import="java.util.Iterator"%>
<%@page import="java.util.List"%>
<%
	request.setCharacterEncoding("UTF-8");
	String body="";
    try {
    	String personid = request.getParameter("personid");
        if (StringUtils.isBlank(personid)) {
             throw new BusinessException("修改用户信息失败");
        }
        String password = request.getParameter("password");
        
    	CommonDao dao =new CommonDao();
    	Hzsyspersonnel per = (Hzsyspersonnel) dao.hibernateGet(Hzsyspersonnel.class,Integer.parseInt(personid));
    	
    	//per.setUserid(request.getParameter("userid"));//系统当前人
    	per.setPersonname(request.getParameter("personname"));//姓名
    	per.setLoginid(request.getParameter("loginid"));
        per.setSex(request.getParameter("sex"));//性别
        per.setBirthday(request.getParameter("birthday"));//出生日期
        per.setWorkday(request.getParameter("workday"));//入职日期
        per.setFolk(request.getParameter("folk"));//民族
        per.setHometown(request.getParameter("hometown"));//籍贯
        per.setIdcard(request.getParameter("idcard"));//身份证
        per.setHealth(request.getParameter("health"));//健康情况
        per.setMastdegree(request.getParameter("mastdegree"));//最高学历
        per.setCertificate(request.getParameter("certificate"));//其他证书
        per.setEmail(request.getParameter("email"));//电子邮件
        per.setTelephone(request.getParameter("telephone"));//联系电话
        per.setAddress(request.getParameter("address"));//现住址
        per.setMarriage(request.getParameter("marriage"));//婚姻情况
        per.setGenro(request.getParameter("genro"));//政治面貌
        per.setRemark(request.getParameter("remark"));//备注
        per.setPerdrder(request.getParameter("perdrder"));//客户等级
        per.setGid(request.getParameter("gid"));//IP
        per.setMobiletelephone(request.getParameter("mobiletelephone")); //手机号
        per.setPassword(password);
        dao.updateinfor(per);
        body = "修改用户信息成功";
		  //如果日期符合提醒日期就向Notice表进行插入


    } catch (Exception ex) {
    	body = "修改用户信息失败";
        throw new BusinessException("修改用户信息失败", ex);
    }
    
%>

<html>
<head>
    <%@ include file="../inc/action_components.jsp" %>
</head>

<body tt.action.result="true" tt.msg="<%=body %>">
<script>
    function afterSuccess() {
	    _parent.__close();
	    __invoke(_parent, "onEditEmployeeFinish");
    }
</script>
</body>
</html>